package com.zhang.zhangapp.bean.user;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2018/4/13.
 */

public class Coupon implements Parcelable {
    private String shopCode;
    private String faceval;
    private String descr;
    private String exp;
    private String factval;

    protected Coupon(Parcel in) {
        shopCode = in.readString();
        faceval = in.readString();
        descr = in.readString();
        exp = in.readString();
        factval = in.readString();
    }

    public static final Creator<Coupon> CREATOR = new Creator<Coupon>() {
        @Override
        public Coupon createFromParcel(Parcel in) {
            return new Coupon(in);
        }

        @Override
        public Coupon[] newArray(int size) {
            return new Coupon[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(shopCode);
        parcel.writeString(faceval);
        parcel.writeString(descr);
        parcel.writeString(exp);
        parcel.writeString(factval);
    }

    public String getShopCode() {
        return shopCode;
    }

    public void setShopCode(String shopCode) {
        this.shopCode = shopCode;
    }

    public String getFaceval() {
        return faceval;
    }

    public void setFaceval(String faceval) {
        this.faceval = faceval;
    }

    public String getDescr() {
        return descr == null ? "" : descr;
    }

    public void setDescr(String descr) {
        this.descr = descr;
    }

    public String getExp() {
        return exp == null ? "" : exp;
    }

    public void setExp(String exp) {
        this.exp = exp;
    }

    public String getFactval() {
        return factval == null ? "0" : factval;
    }

    public void setFactval(String factval) {
        this.factval = factval;
    }
}
